import React from 'react'
import { useLocation } from 'react-router-dom'
import Home from '../../components/index'
import axios from '../../utils/index'
function Index() {
  const qwe=useLocation()
  console.log(qwe);
  
  const zhifu=async()=>{
    const resp=await axios.get('/pay',{params:{
      title:'支付',
      id:124556,
      price:3456
   
    }})
    window.open(resp.data.data)
  }
  return (
    <div>
      <Home v={qwe.state}></Home>
      <span onClick={()=>zhifu()}>详情预约</span>
    </div>
  )
}

export default Index
